package com.kedi.evergreenschoolcenter.writer.dao.mapper;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 
 *
 * @author: 		陈辽逊
 * @date: 			2019/7/13 10:29
 */
@Mapper
public interface WriterOnlineClassMapper {
	
	/**
	 * 				 根据在线课堂id进行点赞
	 * @param 		 id
	 * @return		 updatelikenum
	 */
    @Update("UPDATE onlineclass SET praisenum=praisenum+1 "  
    		+"WHERE id=(#{id})")
    int updatepraisenum(@Param("id") int id);
    
    /**
     * 				 根据在线课堂id进行收藏
     * @param 		 id
     * @return		 updatecollectnum 
     */
    @Update("UPDATE onlineclass SET collectnum=collectnum+1 "  
    		+"WHERE id=(#{id})")
    int updatecollectnum(@Param("id") int id);
	
}
